package sdkshell.kuaiyan.com.kuaiyansdk.bean;

import java.util.HashMap;
import java.util.Map;

import sdkshell.kuaiyan.com.kuaiyansdk.BuildConfig;


/**
 * Created by wm on 2017/12/20.
 */

public class ApkNames {
    public static final String AdSdk = "sdkPlugin.apk";
    public static final String SignSdk = "SignsdkPlugin.apk";
    public static final String ShareSdk = "SelectSharePlugin.apk";
    public static final String MenuWealSdk = "MenuWealPlugin.apk";
    public static final String videoShadowSdk = "videoShadow.apk";
    public static final String dataStatisticsSdk = "dataStatisticsSdk.apk";
    public static final String appDataStatisticsSdk = "appDataStatisticsSdk.apk";
    public static Map<String,String> map = new HashMap<>();
    public static Map<String,Boolean> inited = new HashMap<>();

    public static Map<String,String> initClazz = new HashMap<>();
    public static Map<String,String> packageNames = new HashMap<>();

    public static Map<String,String> urlMap = new HashMap<>();
    static {
        map.put(AdSdk,AdSdk+"sp");
        map.put(SignSdk,SignSdk+"sp");
        map.put(MenuWealSdk,MenuWealSdk+"sp");
        map.put(ShareSdk,ShareSdk+"sp");
        map.put(videoShadowSdk,videoShadowSdk+"sp");
        map.put(dataStatisticsSdk,dataStatisticsSdk+"sp");
        map.put(appDataStatisticsSdk,appDataStatisticsSdk+"sp");

        inited.put(AdSdk,false);
        inited.put(SignSdk,false);
        inited.put(MenuWealSdk,false);
        inited.put(ShareSdk,false);
        inited.put(videoShadowSdk,false);
        inited.put(dataStatisticsSdk,false);
        inited.put(appDataStatisticsSdk,false);

        initClazz.put(AdSdk,"com.wmcsk.application.AdApplication");
        initClazz.put(SignSdk,"demo.kuaiyan.com.signluck.application.SignApplication");
        initClazz.put(MenuWealSdk,"com.kuaiyan.menuplugin.application.MenuWealApplication");
        initClazz.put(ShareSdk,"com.kuaiyan.word.application.SignApplication");
        initClazz.put(videoShadowSdk,"com.kuaiyan.video.shadow.application.VideoShadowApplication");
        initClazz.put(dataStatisticsSdk,"com.kuaiyan.datastatistics.application.DataStatisticsApplication");
        initClazz.put(appDataStatisticsSdk,"com.kuaiyan.kydatastatistics.application.DataStatisticsApplication");

        packageNames.put(AdSdk, "sdkshell.kuaiyan.com.pluginsdk");
        packageNames.put(SignSdk,"demo.kuaiyan.com.signplugin");
        packageNames.put(MenuWealSdk,"com.kuaiyan.menuplugin");
        packageNames.put(ShareSdk,"com.kuaiyan.word");
        packageNames.put(videoShadowSdk,"com.kuaiyan.video.shadow");
        packageNames.put(dataStatisticsSdk,"com.kuaiyan.datastatistics");
        packageNames.put(appDataStatisticsSdk,"com.kuaiyan.kydatastatistics");

        urlMap.put(AdSdk, BuildConfig.URL+"/api/api.php?type=sdkVersions");
        urlMap.put(SignSdk, BuildConfig.URL+"/api/api.php?type=signSdkVersions");
        urlMap.put(MenuWealSdk, BuildConfig.URL+"/api/api.php?type=menuWealSdkVersions");
        urlMap.put(ShareSdk, BuildConfig.URL+"/api/api.php?type=selectShareSdkVersions");
        urlMap.put(videoShadowSdk, BuildConfig.URL+"/api/api.php?type=videoShadowSdkVersions");
        urlMap.put(dataStatisticsSdk, BuildConfig.URL+"/api/api.php?type=dataStatisticsSdkVersions");
        urlMap.put(appDataStatisticsSdk, BuildConfig.URL+"/api/api.php?type=kydatastatisticsSdkVersions");
    }
    public static String get(String key){
        return map.get(key);
    }

    public static boolean inited(String key){
        return inited.get(key);
    }
    public static String getInitClazz(String key){
        return initClazz.get(key);
    }
    public static String getPackageName(String key){
        return packageNames.get(key);
    }
    public static String getPluginUrl(String key){
        return urlMap.get(key);
    }
}
